/**
 * Created by spatra on 15-1-6.
 */

define(['lessonDiscussionJS/module'], function(lessonDiscussionModule){

  /**
   * 此指令用于讨论显示列表中，显示一条讨论的简要信息
   */
  lessonDiscussionModule.directive('discussionListItem', ['$stateParams', 'lessonDiscussionModuleBaseUrl',
    function($stateParams, lessonDiscussionModuleBaseUrl){

      return {
        restrict: 'EA',
        replace: true,
        templateUrl: lessonDiscussionModuleBaseUrl + 'tpls/discussion-list-item.html',
        scope: {
          'discussion': '='
        },
        link: function(scope){
          scope.currentLessonId = $stateParams['lessonId'];
        }
      };

    }]);//End of --> discussionListItem
});